	<META HTTP-EQUIV="pragma" CONTENT="no-cache"> 
	<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate"> 
	<META HTTP-EQUIV="expires" CONTENT="0">
	
	<empty name="Think.cookie.easyuiThemeName">
		<link rel="stylesheet" type="text/css" href="__PUBLIC__/Common/easyui/themes/default/easyui.css">
	<else />
		<link id="easyuiTheme" rel="stylesheet" type="text/css" href="__PUBLIC__/Common/easyui/themes/{$Think.cookie.easyuiThemeName}/easyui.css"> 
	</empty>
	 
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/Common/easyui/css/admin.css">
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/Common/easyui/themes/icon.css">

	<script type="text/javascript" src="__PUBLIC__/Common/easyui/js/jquery.min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/js/jquery.cookie.js"></script>
	<script type="text/javascript" src="__PUBLIC__/Common/easyui/js/jquery.easyui.min.js"></script>
	
	
	<!-- <script type="text/javascript" src="__PUBLIC__/Common/easyui/js/easyloader.js"></script> -->
	<script type="text/javascript" src="__PUBLIC__/Common/easyui/js/easyui-lang-zh_CN.js"></script>
	<script type="text/javascript" src="__PUBLIC__/Common/easyui/js/common.js"></script>
	<script type="text/javascript" src="__PUBLIC__/Common/easyui/js/extends.js"></script>
	<script type="text/javascript" src="__PUBLIC__/Common/easyui/js/jquery.easyui.patch.js"></script>
	
	<script type="text/javascript" src="__PUBLIC__/Common/easyui/js/datagrid-detailview.js"></script>
	<script type="text/javascript" src="__PUBLIC__/default/js/LodopFuncs.js"></script>
	<script type="text/javascript" src="__PUBLIC__/default/js/index.js?s=1"></script>
	<script type="text/javascript" src="./Public/Admin/lib/layer/1.9.3/layer.js"></script>
	<style>
	.footer {
		text-align: center;
		color: #15428B;
		margin: 0px;
		padding: 0px;
		line-height: 23px;
		font-weight: bold;
	}
	.topLine{
		overflow: hidden;
		height: 43px;
		line-height: 20px;
		color: rgb(255, 255, 255);
		font-family: Verdana, 微软雅黑, 黑体;
		background: url(__PUBLIC__/default/img/layout-browser-hd-bg.gif) 50% 50% repeat-x rgb(127, 153, 190);
	}
	.topLine .fr a{
		color:#fff;
	}

	</style>
	<script>
	//用户名
	var username="{$Think.session.username}";
	var nick_name="{$Think.session.nick_name}";
	var personnel_no="{$Think.session.personnel_no}";
	//常用列表json格式
	var section_lists={$section_lists};//部门列表
	var unit_lists={$unit_lists};//单位列表
	var personnel_lists={$personnel_lists};//员工列表
	var warehouse_lists={$warehouse_lists};//仓库列表
	var storage_lists={$storage_lists};//库位列表
	var coin_lists={$coin_lists};//获得币制
	var country_lists={$country_lists};//获得国家
	var unit_lists={$unit_lists};//获得单位
	var contactscompany_lists={$contactscompany_lists};//获得往来单位列表
	//列表
	var getgoodsUrl="{:U('Stock/get_goods')}";//商品列表
	var getpackagematerialbooksUrl="{:U('Stock/get_packagematerialbooks')}";//商品列表
	//常用列表
		var storageListUrl="{:U('Tablelist/ajax_storagelist')}";//库位列表
		var depotListUrl="{:U('Tablelist/ajax_depotlist')}";//仓库列表
		var erplistUrl="{:U('Tablelist/ajax_erplist')}";//erp列表
		var bookscateUrl="{:U('Tablelist/ajax_bookscate')}";//账册类别
		var authruleUrl="{:U('Tablelist/ajax_authrule')}";//规则列表
		var CoinlistUrl="{:U('Tablelist/ajax_coin')}";//获得币制
		var CountrylistUrl="{:U('Tablelist/ajax_country')}";//获得国家
		var UnitlistUrl="{:U('Tablelist/ajax_unit')}";//获得单位
		var SectionlistUrl="{:U('Tablelist/ajax_section')}";//获得部门列表
		var PersonnellistUrl="{:U('Tablelist/ajax_personnel')}";//获得员工列表
		var ContactsCompanylistUrl="{:U('Tablelist/ajax_contactscompany')}";//获得往来单位列表
		var BoundCatelistUrl="{:U('Tablelist/ajax_boundcate')}";//获得出入库类别列表
		var BoundCatelistUrl2="{:U('Tablelist/ajax_outboundcate')}";//获得出出库类别列表
		var interceptkeylistUrl="{:U('Tablelist/ajax_interceptkey')}";//拦截key列表
		var manualistUrl="{:U('Tablelist/ajax_manualist')}";//账册列表
		var goodscateListUrl="{:U('Tablelist/ajax_goodscate')}"//商品分类列表
		var OutboundcatelistUrl="{:U('Tablelist/ajax_outboundcatelist')}"//出库类型列表
		
	//获得当前对应名称
		var getStorageUrl="{:U('Tablelist/get_storage')}";//获得库位名称
		var getDepotUrl="{:U('Tablelist/get_depot')}";//获得仓库名称
		var getErpNameUrl="{:U('Tablelist/get_erpname')}";//获得erp名称
		var getCoinUrl="{:U('Tablelist/get_coin')}";//获得币制
		var getCountryUrl="{:U('Tablelist/get_country')}";//获得国家
		var getUnitUrl="{:U('Tablelist/get_unit')}";//获得单位
		var getSectionNameUrl="{:U('Tablelist/get_sectionname')}";//获得对应部门名称
		var getPersonnelNameUrl="{:U('Tablelist/get_personnelname')}";//获得对应员工姓名
		var getContactsCompanyNameUrl="{:U('Tablelist/get_contactscompanyname')}";//获得对应往来单位名称
		var getBoundCateNameUrl="{:U('Tablelist/get_boundcatename')}";//获得对应出入库类别名称
		var getInterceptkeyUrl="{:U('Tablelist/get_interceptkey')}";//获得仓库名称
		var getLogisticsUrl="{:U('Tablelist/get_logistics')}";//获得仓库名称
		var getOutboundcateUrl="{:U('Tablelist/get_outboundcate')}"//出库类型列表
		
	//刷新当前标签Tabs
		function RefreshTab(currentTab) {
			var url = $(currentTab.panel('options')).attr('href');
			//alert(url);
			$('#Tabs').tabs('update', {
				tab: currentTab,
				options: {
					href: url
				}
			});
			currentTab.panel('refresh');
		}
		function closeTab(title){
			$('#Tabs').tabs('close',title);
		}
		function showTab(url,title){
	  		var id = arguments[2] ? arguments[2] : null;
			var cid = arguments[3] ? arguments[3] : null;
			//设置id为showTab的第三个参数，默认值为null,类似php中showTab(url,title,id=null)这种写法
			<!-- alert(id); -->
			<!-- alert(cid); -->
			<!-- console.log(id); -->
			if(id!==null && cid!==null){
				url=url+"&id="+id+"&cid="+cid;
			}
			if(id!==null && cid===null){
				url=url+"&id="+id;
			}
			if(id===null && cid!==null){
				url=url+"&cid="+cid;
			}
			<!-- alert(url); -->
			if ($('#Tabs').tabs('exists',title)){
				//带参数时先关闭选项卡再打开
				if(id!==null || cid!==null){
					$('#Tabs').tabs('close',title);
					$('#Tabs').tabs('add',{
						title:title,
						content:'<iframe src="'+url+'" scrolling=yes class="easyui-layout" data-options="fit : true,border : false" style="width:100%;height:100%;border:0;"></iframe>',
						closable:true,
						tools:[{
							iconCls:'icon-mini-refresh',    
							handler:function(){    
								var currentTab = $('#Tabs').tabs('getSelected');
								RefreshTab(currentTab);
							}
						}],
						onLoadError:function(data){
							var info=eval('('+data.responseText+')');
							$.messager.confirm('错误提示',info.message,function(r){
								$('#Tabs').tabs('close',title);
							});
							return false;
						}
					});
				}else{
					$('#Tabs').tabs('select',title);
				}
			} else {
				$('#Tabs').tabs('add',{
					title:title,
					content:'<iframe src="'+url+'" scrolling=yes class="easyui-layout" data-options="fit : true,border : false" style="width:100%;height:100%;border:0;"></iframe>',
					closable:true,
					tools:[{
						iconCls:'icon-mini-refresh',    
						handler:function(){    
							var currentTab = $('#Tabs').tabs('getSelected');
							RefreshTab(currentTab);
						}    
					}],
					onLoadError:function(data){
						var info=eval('('+data.responseText+')');
						$.messager.confirm('错误提示',info.message,function(r){
							$('#Tabs').tabs('close',title);
						});
						return false;
					}	
				});
			}
		}
		changeTheme = function(type){  
			var $easyuiTheme = $('#easyuiTheme');  
			var url = $easyuiTheme.attr('href');  
			console.info(url);  
			var href = url.substring(0, url.indexOf('easyui'))+ 'easyui/themes/' + type + '/easyui.css';  
			console.info(href);  
			$easyuiTheme.attr('href',href);  
			  
			//如果使用了iframe  则要添加下面这段代码、否则的话iframe中的内容不会出现样式的改变  
			var $iframe = $('iframe');
			console.log($iframe);
			if($iframe.length > 0){  
				for ( var i = 0; i < $iframe.length; i++) {  
					var ifr = $iframe[i];  
					$(ifr).contents().find('#easyuiTheme').attr('href', href);  
				}  
			}
		
			$.cookie('easyuiThemeName', type, {  
				expires : 7  
			});  
		};
	</script>